$(function() {
    chrome.tabs.getSelected(null, function (tab) {
        new QRCode(document.getElementById("qrimg"), tab.url);
    });

});
